package main

import (
	"PandaDB/internal/gui"
	"PandaDB/pkg/utils"

	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
)

func main() {

	var version string = "v1.0.0"

	// 设置中文字体:解决中文乱码问题
	utils.InitsChinese()

	a := app.New()
	w := a.NewWindow("Passtree " + version)
	// fmt.Printf("%T", w)
	ui := gui.NewMainWindow(a, w)
	ui.CreateMenuItems()
	ui.Version = version
	content := ui.MakeUI()
	w.SetContent(content)

	// 设置窗口大小,
	// w.Resize(fyne.NewSize(1000, 600))
	w.Resize(fyne.NewSize(700, 450))
	// 窗口居中
	w.CenterOnScreen()
	//设置主窗口
	w.SetMaster()
	w.ShowAndRun()
}
